<?php
// 本类由系统自动生成，仅供测试用途
namespace Admin\Controller;
use Think\Controller;
class SmsController extends Controller {
    public function index(){
        echo "lllll";die;
    }
    /**
	* 生成短信验证码并写入session	2016-11-21
	*/
	public function createsms(){
		$mobilephone = I('request.mobilephone');
		// $mobilephone = "17783641562";
		
		if(!check_mobilephone($mobilephone)){
			$this -> ajaxReturn(array('ret'=>0,'msg'=>'请输入正确的手机号'));
		}
		
		$checkcode = createverifycode();
		$checkinfo = array(
			'mobilephone' => $mobilephone,
			'checkcode'   => $checkcode,
		);
		$content = '【筋斗车】您的验证码为'.$checkcode.'。如非本人操作，请忽略本短信';
		messagelog($mobilephone,$content);
	
		$this -> ajaxReturn(array('ret'=>1,'checkinfo'=>$checkinfo));
	}
}